<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

var_dump(rand(1,100));

$urls = array(
'http://www.zumzi.ro/iasi',
'http://www.zumzi.ro/bucuresti',
'http://www.zumzi.ro/constanta',
'http://www.zumzi.ro/craiova',
'http://www.zumzi.ro/cluj-napoca',
'http://www.zumzi.ro/arad',
'http://www.zumzi.ro/focsani',
'http://www.zumzi.ro/pitesti',
);

foreach($urls as $url)
{
  $ckfile = 'test.txt';
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile);
  curl_setopt ($ch, CURLOPT_COOKIEFILE, $ckfile);
  curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
  curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); 
  $html = curl_exec($ch);
  curl_close($ch);
  //var_dump(md5($html));
  var_dump(file_get_contents('test.txt'));
  //file_put_contents('page.txt',$html);
}

